package org.jsbd.boss.dao;

import java.util.List;
import org.jsbd.boss.domian.Book;

public interface IBookDao {

	void save(Book book);

	void save(List<Book> list);

	/**
	 * 保存到临时表
	 * 
	 * @param list
	 */
	void saveToTemp(List<Book> list);

	void update(Book book);
	
	void updateTotalMoney(Book book);
	
	void updateFailCount(Integer id);
	
//	void updateByMarkAndName(Book book);
//
//	int updateAvailableNum(Book book);

	Book get(Book book);

	Book getById(Integer id);
	
	Book getByMarkAndName(Book book);
	
	Book getByMark(String mark);
	
	
	void updatePayMoneyById(Book book);
	
	List<Book> getList(Book book);

	Integer getListPageCount(Book book);
	
	List<Book> getGroupList(Integer bookGroupId);

	void delete(List<Integer> ids);
	
	void deleteByBookGroupId(Integer bookGroupId);
	
	
	/*---------以下临时表操作----*/
		
	Integer getTempListPageCount(Book book);

	List<Book> getTempListByPage(Book book);
	
	Integer getTempCountByMarkAndName(Book book);
	
	List<Book> getTempList();
	
	void clearTemp();

	Integer getTempCount();
	
	
	
	List<Book> getRevertBookList();
	
	void saveBookRevertLog(Book book);
	
	Integer revertBookPayMoney(Integer bookId);
}
